package ace.module.account.core.impl.dao.aggregate;

import ace.module.account.api.model.input.IamAccountSearchInput;
import ace.module.account.core.impl.dao.entity.IamAccount;
import ace.module.account.core.impl.dao.entity.IamAccountEventRecord;
import ace.module.account.core.impl.dao.entity.IamAccountPassport;
import ace.module.account.core.impl.dao.entity.IamAccountPassword;
import ace.module.account.core.impl.dao.entity.IamAccountProfile;
import jakarta.annotation.Nullable;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * 账户 aggregate.
 *
 * @author Caspar
 */
public interface IamAccountAggregate {

  Page<IamAccount> search(IamAccountSearchInput input, Pageable pageable);

  void insertRegisterAccount(IamAccount account,
      IamAccountPassport iamAccountPassport,
      IamAccountProfile accountProfile,
      IamAccountEventRecord accountEvent,
      @Nullable IamAccountPassword accountPassword
  );
}